﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <DataTemplate x:Key="votesCellStyle">
        <Grid HorizontalAlignment="Center" VerticalAlignment="Center"  Width="60" Height="65" ShowGridLines="False">
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="20"/>
            </Grid.RowDefinitions>
            <TextBlock Grid.Row="0" Text="{Binding NumberOfVotes}" FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center"  />
            <TextBlock Grid.Row="1" Text="votes" FontSize="11" HorizontalAlignment="Center" VerticalAlignment="Top"  />
        </Grid>
    </DataTemplate>

    <DataTemplate x:Key="answersCellStyle">
        <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Width="60" Height="65" ShowGridLines="False">
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="20"/>
            </Grid.RowDefinitions>
            <TextBlock Grid.Row="0" Text="{Binding NumberOfAnswers}" FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center"  />
            <TextBlock Grid.Row="1" Text="answers" FontSize="11" HorizontalAlignment="Center" VerticalAlignment="Top"  />
        </Grid>
    </DataTemplate>

    <DataTemplate x:Key="viewsCellStyle">
        <Grid HorizontalAlignment="Center" VerticalAlignment="Center"  Width="60" Height="65" ShowGridLines="False">
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="20"/>
            </Grid.RowDefinitions>
            <TextBlock Grid.Row="0" Text="{Binding NumberOfViews}" FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Center"  />
            <TextBlock Grid.Row="1" Text="views" FontSize="11" HorizontalAlignment="Center" VerticalAlignment="Top"  />
        </Grid>
    </DataTemplate>

    <DataTemplate x:Key="questionCellStyle">
        <Grid HorizontalAlignment="Center" VerticalAlignment="Center"  Width="450" Height="65" ShowGridLines="False">
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="20"/>
            </Grid.RowDefinitions>
            <TextBlock Grid.Row="0" 
                       Text="{Binding QuestionTitle}" 
                       TextWrapping="Wrap"  
                       Margin="20,0,0,0" 
                       FontSize="18" 
                       HorizontalAlignment="Left" 
                       VerticalAlignment="Center"  />
            <TextBlock Grid.Row="1" 
                       Text="tags" 
                       FontSize="11" 
                       HorizontalAlignment="Left"  
                       Margin="20,0,0,0"  
                       VerticalAlignment="Top"  />
        </Grid>
    </DataTemplate>

    <DataTemplate x:Key="mainRowDetailStyle">
        <Grid>
            <TextBlock Text="{Binding QuestionContent}" FontSize="12" Margin="15"/>
        </Grid>
    </DataTemplate>
</ResourceDictionary>
